#!/bin/bash

echo "🧪 测试图片下载功能..."
echo "======================"

# 测试URL
TEST_URL="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png"

echo "📥 测试下载图片: $TEST_URL"

# 发送POST请求测试图片下载
curl -X POST http://localhost:5005/api/download-image \
  -H "Content-Type: application/json" \
  -d "{\"image_url\": \"$TEST_URL\"}" \
  -w "\n状态码: %{http_code}\n"

echo ""
echo "📁 检查temp目录内容:"
ls -la temp/

echo ""
echo "🎯 测试完成！"
